'\" te
.\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH GETAUDITFLAGS 3BSM "Mar 6, 2017"
.SH NAME
getauditflags, getauditflagsbin, getauditflagschar \- convert audit flag
specifications
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lbsm\fR \fB -lsocket \fR  \fB -lnsl \fR  [ \fIlibrary\fR... ]
#include <sys/param.h>
#include <bsm/libbsm.h>

\fBint\fR \fBgetauditflagsbin\fR(\fBchar *\fR\fIauditstring\fR, \fBau_mask_t *\fR\fImasks\fR);
.fi

.LP
.nf
\fBint\fR \fBgetauditflagschar\fR(\fBchar *\fR\fIauditstring\fR, \fBau_mask_t *\fR\fImasks\fR, \fBint\fR \fIverbose\fR);
.fi

.SH DESCRIPTION
.LP
The \fBgetauditflagsbin()\fR function converts the character representation of
audit values pointed to by \fIauditstring\fR into \fBau_mask_t\fR fields
pointed to by \fImasks\fR. These fields indicate which events are to be audited
when they succeed and which are to be audited when they fail.
.sp
.LP
The \fBgetauditflagschar()\fR function converts the \fBau_mask_t\fR fields
pointed to by \fImasks\fR into a string pointed to by \fIauditstring\fR. If
\fIverbose\fR is 0, the short (2-character) flag names are used. If
\fIverbose\fR is non-zero, the long flag names are used. The \fIauditstring\fR
argument should be large enough to contain the \fBASCII\fR representation of
the events.
.sp
.LP
The \fIauditstring\fR argument contains a series of event names, each one
identifying a single audit class, separated by commas.  The \fBau_mask_t\fR
fields pointed to by \fImasks\fR correspond to binary values defined in
<\fBbsm/audit.h\fR>, which is read by  <\fBbsm/libbsm.h\fR>.
.SH RETURN VALUES
.LP
Upon successful completion, \fBgetauditflagsbin()\fR and
\fBgetauditflagschar()\fR return 0. Otherwise they return \(mi1.
.SH ATTRIBUTES
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
MT-Level	MT-Safe
.TE

.SH SEE ALSO
.LP
.BR audit.log (5),
.BR attributes (7)
.SH BUGS
.LP
This is not a very extensible interface.
